<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>在线聊天室</title>

    <link rel="stylesheet" href="css/@tdesign-vue-next/chat.css">
    <script src="js/vue.global.js"></script>
    <script src="js/@tdesign-vue-next/chat.js"></script>
</head>
<body>
    <div id="app">
        test page
        <t-chat
            :data="[
                {
                    avatar: 'https://tdesign.gtimg.com/site/chat-avatar.png',
                    name: 'Assistant',
                    datetime: new Date().toLocaleString(),
                    content: '它叫 McMurdo Station ATM，是美国富国银行安装在南极洲最大科学中心麦克默多站的一台自动提款机。',
                    role: 'assistant',
                },
                {
                    avatar: 'https://tdesign.gtimg.com/site/avatar.jpg',
                    name: 'User',
                    datetime: new Date().toLocaleString(),
                    content: '南极的自动提款机叫什么名字？',
                    role: 'user',
                }
            ]"
        ></t-chat>
    </div>

    <script>
        const app = Vue.createApp({
            data() {
                return {
                    messages: [
                        { content: 'Hello, world!', user: { name: 'Alice' }, timestamp: new Date() },
                        { content: 'Hi there!', user: { name: 'Bob' }, timestamp: new Date() }
                    ],
                    inputMessage: '',
                    user: { name: 'User' }
                };
            },
            methods: {
            }
        });
        app.use(TDesign.default);
        app.mount('#app');
        console.dir(window);
        console.dir(app);
    </script>
</body>
</html>


